<?php session_start(); ?>
<link rel="stylesheet" type="text/css" href = "styles/common.css" />

<?php
	$username = $_SESSION['username'];
	$id = $_SESSION['id'];
	if (!empty($username)) {
?>
<div class = "logged_in">
		Welcome, <?php echo $username ?>! <a href = "logout.php"> Log out </a>
		<br>
		<a href = "edit_info.php"> Edit information </a> 
		<br>
		
		<?php if (strcmp($username , "Admin") == 0) { ?>
			<a href = "registration.php"> Register new moderator </a> <br>
</div>			
		<?php } else { ?>
			<a href = ""> </a> <br>
		<?php } 
	} else { ?> <div class = "login"> 

		<form action="login.php" method="POST">
			
				<input type="text" name="username" class = "bordered_input" placeholder = " Username:" size = "15" maxlength = "15"> 
				<input type="password" name="password" class = "bordered_input" placeholder = " Password:" size = "15" maxlength = "15">
				</br>
				<input type="submit" value="Enter site" name="submit" class = "button login-button">
			
		</form>
		</div>
<?php
	}
?>